#include <vector>
using namespace std;
void sortColors(vector<int> &nums) {
  vector<int> count(3, 0);
  for (int i : nums) {
    count[i]++;
  }
  int p = 0;
  for (int i = 0; i < 3; ++i) {
    for (int j = 0; j < count[i]; j++) {
      nums[p++] = i;
    }
  }
}